<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
        <h:outputStylesheet name="css/jsfcrud.css"/>
    </h:head>
    <h:body>
        <ui:composition template="./TemplatePagina.xhtml">
            <ui:define name="top">
            </ui:define>

            <ui:define name="content">
                <h:form>
                    <p:panel header="Dados do Cliente">
                        <h:panelGrid columns="2">
                            <h:outputLabel value="Nome: "/>
                            <h:inputText value="#{clienteMB.cliente.nome}"/>
                            
                            <h:outputLabel value="Sobrenome"/>
                            <h:inputText value="#{clienteMB.cliente.sobrenome}"/>
                            
                            <h:outputLabel value="CPF: "/>
                            <h:inputText value="#{clienteMB.cliente.cpf}"/>

                            <h:outputLabel value="Data Nascimento: "/>
                            <h:inputText value="#{clienteMB.cliente.dataNascimento}">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
                            </h:inputText>

                            <h:panelGroup/>
                            <h:commandButton action="#{clienteMB.adiciona}" value="Salvar"/>
                        </h:panelGrid>
                    </p:panel>
                </h:form>

            </ui:define>
            <ui:define name="bottom">

            </ui:define>
        </ui:composition>
    </h:body>

</html>

